import request from '@/utils/request'

// 查询出入库审核列表
export function listAudit(query) {
  return request({
    url: '/warehouse/audit/list',
    method: 'get',
    params: query
  })
}

// 查询出入库审核详细
export function getAudit(id) {
  return request({
    url: '/warehouse/audit/' + id,
    method: 'get'
  })
}

// 新增出入库审核
export function addAudit(data) {
  return request({
    url: '/warehouse/audit',
    method: 'post',
    data: data
  })
}

// 修改出入库审核
export function updateAudit(ids) {
  return request({
    url: '/warehouse/audit/'+ ids,
    method: 'put'
  })
}

// 作废修改记录
export function cancelAudit(data) {
  return request({
    url: '/warehouse/audit/',
    method: 'put',
    data: data
  })
}
